# Makefile to build parallel arnoldi project 

# CC = /usr/local/third_party/bin/mpiCC
CC = /home/export/base/ycsc_wangjc/liugx/online1/third_party/bin/mpiCC
CFLAGS =  -fPIC -O3 -I ./include
SRC = $(wildcard ./src/*.c)
OBJECTS = $(foreach srcFile, $(SRC), $(patsubst %.c, %.o, $(srcFile)))
LIBS = -lm -Wl,-rpath=/home/export/base/ycsc_wangjc/liugx/online1/third_party/lib
TARGET = gmres


$(TARGET): $(OBJECTS) 
	$(CC)  -o $(TARGET)  $(OBJECTS) $(LIBS)

# compile the source codes files
%.o : %.c
	$(CC) $(CFLAGS) -c $< -o $@

# --- remove object and executable files
.PHONY : clean
clean:
	rm -f $(TARGET) $(OBJECTS)
